Program Repair by Stepwise Correctness Enhancement
نویسندگان
چکیده
Relative correctness is the property of a program to be more-correct than another with respect to a given specification. Whereas the traditional definition of (absolute) correctness divides candidate program into two classes (correct, and incorrect), relative correctness arranges candidate programs on the richer structure of a partial ordering. In other venues we discuss the impact of relative correctness on program derivation, and on program verification. In this paper, we discuss the impact of relative correctness on program testing; specifically, we argue that when we remove a fault from a program, we ought to test the new program for relative correctness over the old program, rather than for absolute correctness. We present analytical arguments to support our position, as well as an empirical argument in the form of a small program whose faults are removed in a stepwise manner as its relative correctness rises with each fault removal until we obtain a correct program.
منابع مشابه
A Methodology for Program Construction by Stepwise Structural Enhancement
We advocate incremental construction of programs based on the idea of skeletons and techniques. Program construction begins bottom-up by rst identifying skeleton program(s) embodying the central data structure(s), and proceeds by building computations around the control ow of the skeleton program(s) by application of techniques. Techniques are high level abstractions for the generic, frequently...
متن کاملDefining Software Faults Why It Matters
Because faults are at the center of software quality concerns, they ought to be defined formally, by semantics-based criteria that enable us to reason about them. In this paper, we consider a semantics-based definition of a fault, which involves the program, the faulty feature (at the appropriate level of granularity) and the specification against which correctness and incorrectness are defined...
متن کاملCorrectness of logic programs using proof schemes
The correctness of logic programs which are constructed by a schema-based method is presented in this paper. This schema-based method constructs typed, moded logic programs by stepwise top-down design using five program schemata, data types and modes. Correctness proofs in this approach are guided by the constructed logic programs. A proof scheme is proposed for each program schema. It is claim...
متن کاملDevelopment of a Prolog Tracer by Stepwise Enhancement
A Prolog tracer is essentially a Prolog interpreter extended to provide features, such as retry, fail, leap, skip, and quasi-skip, to trace the computational ow of a program. This paper describes how a Prolog tracer may be built by stepwise enhancement. Using this method, rst a collection of partial-tracers are developed, each partial-tracer providing only a part of the tracer's functionality. ...
متن کاملAlgebra of programming in Agda: Dependent types for relational program derivation
Relational program derivation is the technique of stepwise refining a relational specification to a program by algebraic rules. The program thus obtained is correct by construction. Meanwhile, dependent type theory is rich enough to express various correctness properties to be verified by the type checker. We have developed a library, AoPA, to encode relational derivations in the dependently ty...
متن کامل